/**
 * index页面的widget配置
 * @copyright 火星科技 mars3d.cn
 * @author 火星渣渣灰 2022-02-19
 */
import { defineAsyncComponent, markRaw } from "vue"
import { WidgetState } from "@/common/store/widget"
import { StoreOptions } from "vuex"

const store: StoreOptions<WidgetState> = {
  state: {
    widgets: [
      {
        component: markRaw(defineAsyncComponent(() => import("./toolbar/index.vue"))),
        name: "toolbar",
        autoDisable: true
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@/widgets/model-manage/index.vue"))),
        name: "model-manage",
        group: "left-top-widget"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("./JB-Plot/index.vue"))),
        name: "jb-plot",
        group: "left-top-widget"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("./action-Plot/index.vue"))),
        name: "action-plot",
        group: "left-top-widget"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("./line-plot/index.vue"))),
        name: "line-plot",
        group: "left-top-widget"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@/widgets/satellite-manage/index.vue"))),
        name: "satellite-manage",
        group: "left-top-widget"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("./ui/index.vue"))),
        name: "ui",
        group: "right-top-widget"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("./overlay-editor/index.vue"))),
        name: "overlay-editor",
        group: "right-top-widget"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("./action-editor/index.vue"))),
        name: "action-editor",
        group: "right-top-widget"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("./czml/index.vue"))),
        name: "czml",
        group: "right-top-widget"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("./setting/index.vue"))),
        name: "setting",
        group: "right-top-widget"
      }
    ],
    openAtStart: ["toolbar"]
  }
}

export default store
